1. Technical Field
The present invention relates to an image processing apparatus and a control method thereof, and more particularly, to an image processing apparatus and a control method thereof that reduces the amount of memory use during execution of image recognition processing.
2. Related Art
Among image processing apparatuses such as printers, an apparatus is known that generates a reduced size image by preliminarily sampling an image, performing image recognition processing based on the reduced size image, and then performing actual image processing. For example, a printer is known that performs image recognition processing, e.g., red-eye correction processing or automatic image correction processing, based on the sampled reduced size image and then performs printing of the image.
Red-eye correction processing is processing for detecting red-eye defects in an image of a human or the like generated at the time of capturing to thereby correct the red-eye defects to a state where the red-eye defects are removed. Automatic image correction processing, also known as APF (Auto Photo Fine), is processing for acquiring statistical information on brightness, saturation, luminance, and the like of an overall image to thereby optimize the balance between the brightness, saturation, and luminance based on the statistical information. When the automatic image correction processing is performed, face recognition processing is also performed to recognize and detect the face of a human or the like in an image, and then, color correction is performed so that the flesh color of the face is clearly seen.
When the image recognition processing is performed, a reduced size image is sufficient and it is not necessary to use a full size image based on original image data (see, for example, Japanese Patent Application Laid-Open No. 2002-271794).
However, the size of the reduced size image necessary for performing the image recognition processing differs depending on the contents of the processing. For example, while an image size of QVGA (320×240 pixels) is sufficient for the automatic image correction processing or the face recognition processing described above, an image size of VGA (640×480 pixels) or more is required in order to perform the red-eye correction processing with a high degree of precision.
When both of the processing operations are to be performed simultaneously, the processing operations may be performed simply based on a reduced size image having the larger size, i.e., VGA or more. However, a memory capacity of about 900 KB is required for holding RGB image data of a VGA-size image, which may be a great load to an image processing apparatus having a small memory capacity. This is particularly so in an embedded type printer having such image recognition processing preliminarily embedded therein since a memory mounted therein has a small memory size, and thus, there may be a case where sufficient memory capacity is secured therein for the image recognition processing.
Moreover, some image processing apparatuses are configured to display reduced size images on a GUI (graphical user interface) screen at high speed. For such high-speed display, the reduced size images are preliminarily generated from original image data by using an idle period of a CPU. The generated reduced size images are stored in a cache memory so that the cached reduced size images are read and displayed when necessary on the GUI screen.
In order for the image processing apparatuses to perform the image recognition processing using the cached reduced size images, the generated reduced size images need to have the VGA size. However, a large memory capacity must be secured in order to cache twenty pieces of reduced size images, for example, and hence, the cost increases by that amount.
On the other hand, a method may be considered in which without using the cached reduced size images, VGA-size images are generated based on original image data whenever the image recognition processing is performed. However, a surplus period of time may be required for the image generation. This is particularly so because the image recognition processing is often performed immediately before a printer starts a printing operation. Thus, the period of time consumed for generating the reduced size images corresponds to a user's print waiting time. Thus, the user's print waiting time is increased and usability of the image processing apparatuses is degraded.